#ifndef _SVR_CONFIG_H_
#define _SVR_CONFIG_H_

#include <string>
#include <map>

using namespace std;

class SvrConfig
{
public:
	SvrConfig();
	SvrConfig(const SvrConfig& other)
	{
		this->_map = other._map;
	}
	virtual ~SvrConfig();
	SvrConfig &operator = (const SvrConfig &other) 
	{
		this->_map = other._map;
		return *this;
	}
	int Init(const string& conf_file);
	void Clear();
	std::string Trim(std::string &str);
	int Read(const std::string &conf_file);
	std::string GetStr(const std::string &sName) const;
	int GetInt(const std::string &sName) const;

public:	
	//int recv_buf_size;
	//int send_buf_size;
	string listen_ip;
	int listen_port;
	bool keepalive;
	int epoll_timeout_ms;
	int thread_num;
	int task_que_capacity;
	//int m_iKeepaliveTimeout;
	bool use_thread_pool;	
protected:
	std::map<std::string, std::string> _map;	
};

#endif  /*SVR_CONFIG_H_*/

